#! /bin/bash
# $Id: testall.sh,v 1.1 2004/02/21 18:48:08 ibo Exp $

ntot=0
nsuc=0

PERL="perl -I$HOME/prgs/perl-lib"

# /lib/perl5/site_perl/5.6.1/

baseaddr='http://www-etu.infop6.jussieu.fr/~p6mip386/test'

for n in $(seq 0 1) 
do
    tname=$(printf 'php-%02d' $n)
    taddr=$(printf '%s/test%02d.php' "$baseaddr" $n)
    $PERL casetest00.pl $tname $taddr ; exitcode=$?
    ntot=$(($ntot+1))
    nsuc=$(($nsuc+($exitcode?0:1)))
done

printf '\n%d successful test(s) out of %d (%s%%)\n' \
    $nsuc $ntot $(echo -n $nsuc '2k100*' $ntot '/p' | dc)
